The present invention relates to preparation of silicon nanocrystals from hydrogen silsesquioxane-like molecules with direct surface passivation. Under the term silicon nanocrystal is understood an object with size less than 20 nm in diameter having a regular silicon crystalline lattice. The preparation of silicon nanocrystals from hydrogen silsesquioxane is a well-known procedure (Henderson, J.; Kelly, J. A.; Veinot, J. G. C., Chem. Mater., 2009, 21 (22), 5426-5434.). Silicon nanocrystals are formed within a silicon oxide matrix at high temperatures from non-modified hydrogen silsesquioxane. However, in order to obtain free, surface-passivated silicon nanocrystals several post-fabrication steps are needed. The nanocrystals need to be released from the silicon dioxide matrix, purified and subsequently passivated via a thermal/photochemical/radical-initiated process. This treatment, to our knowledge, leads to a non-uniform coverage of nanocrystals, where passivation molecules tend to polymerize, leaving some surface atoms non-passivated (Yang, Z.; Iqbal, M.; Dobbie, A. R.; Veinot, J. G. C., J. Am. Chem. Soc., 2013, 135 (46), 17595-17601). Under the term silicon nanocrystal passivation shell is understood a layer of molecules, mainly other than silicon, which are bound to surface silicon atoms of the silicon nanocrystal. These procedures are tedious, time and effort consuming and the yield of uniformly passivated silicon nanocrystals is compromised. In general, along with the size of nanocrystals, surface passivation is recognized as an important parameter affecting optical properties. Up to now the passivation with organics molecules resulted in broadening of the linewidth (Sychugov, I.; Fucikova, A.; Pevere, F.; Yang, Z. Y.; Veinot, J. G. C.; Linnros, J.; ACS Photonics, 2014, 1, 10, 998-1005). SiO2 passivated silicon nanocrystals exhibit luminescence linewidth usually in the range of 120-150 meV and for passivation with organic ligands 150-280 meV. An overview of surface passivation by organics molecules is given in review by Veinot (J. G. C. Veinot “Surface Passivation and Functionalization of Si Nanocrystals” in “Silicon Nanocrystals: Physics and Applications” edited by Prof. Dr. Lorenzo Pavesi of Trento University, and Prof. Dr. Rasit Turan, Wiley-VCH Verlag GmbH & Co 2010, ISBN 978-3-527-32160-5).